package cn.huiyunche.base.service.interfaces.impl;

import cn.huiyunche.base.service.interfaces.OrderAttachService;
import cn.huiyunche.base.service.mappers.SOrderAttachMapper;
import cn.huiyunche.base.service.model.SOrderAttach;
import cn.huiyunche.base.service.model.SOrderAttachExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by LYN on 6/13/16.
 */
@Service
public class OrderAttachServiceImpl implements OrderAttachService {

    @Autowired
    private SOrderAttachMapper orderAttachMapper;

    public List<SOrderAttach> getByOrderId(Long orderid) {
        SOrderAttachExample orderAttachSearch = new SOrderAttachExample();
        orderAttachSearch.createCriteria().andOrderIdEqualTo(orderid);
        return getOrderAttachMapper().selectByExample(orderAttachSearch);
    }

    public SOrderAttachMapper getOrderAttachMapper() {
        return orderAttachMapper;
    }
}
